import request from '@/utils/system/request'

// 获取数据api
export function getData(data: object) {
  return request({
    url: 'get/account/history?displayCount='+data.pageSize+'&currentPage='+data.page+'&accountHistoryName='+data.merchantName+'&accountHistoryNo='+data.agentName+'&operatorType='+data.freeStatus+'&startTime='+data.startTime+'&endTime='+data.endTime,
	method: 'GET',
    // baseURL: '/mock',
    data
  })
}
//轮询池开始
export function getDatalunxun(data: object) {
  return request({
    url: 'get/road?displayCount='+data.pageSize+'&currentPage='+data.page+'&roadName='+data.merchantName+'&productName='+data.agentName+'&roadPoolCode='+data.roadPoolCode,
	method: 'GET',
    // baseURL: '/mock',
    data
  })
}

export function getDatalunxunnj(data: object) {
  return request({
    url: 'get/profit?displayCount='+data.pageSize+'&currentPage='+data.page+'&roadName='+data.merchantName+'&productName='+data.agentName+'&roadPoolCode='+data.roadPoolCode,
	method: 'GET',
    // baseURL: '/mock',
    data
  })
}


// 获取用户资金数据api
export function getzhijinData(data: object) {
  return request({
    url: '/get/account?displayCount='+data.pageSize+'&currentPage='+data.page,
	method: 'GET',
    // baseURL: '/mock',
    data
  })
}

// 获取数据api
export function getProduct() {
  return request({
    url: '/get/product',
	method: 'GET',
    // baseURL: '/mock',
    // data
  })
}

// 获取数据api
export function deltongdao(data: object) {
  return request({
    url: '/save/roadUid?roadPoolCode='+data.uidcode+'&roadUid='+data.roadPoolCode,
	method: 'GET',
    // baseURL: '/mock',
    // data
  })
}

// 获取分类数据
export function getCategory(data: object) {
  return request({
    url: '/table/category',
    method: 'post',
    baseURL: '/mock',
    data
  })
}

// 获取树组织数据
export function getTree(data: object) {
  return request({
    url: '/table/tree',
    method: 'post',
    baseURL: '/mock',
    data
  })
}

// 新增
export function add(data: object) {
  return request({
    url: '/add/road',
    method: 'post',
    // baseURL: '/mock',
    data
  })
}

// 编辑
export function update(data: object) {
  return request({
    url: '/add/editroad',
    method: 'post',
    // baseURL: '/mock',
    data
  })
}
// 编辑
export function updateone(data: object) {
  return request({
    url: '/get/oneRoad',
    method: 'post',
    // baseURL: '/mock',
    data
  })
}
// 删除
export function del(data: object) {
  return request({
    url: '/delete/road',
    method: 'post',
    // baseURL: '/mock',
    data
  })
}